package pe.com.bbva.ge.vista.vaadin.ui;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import pe.com.bbva.ge.vista.vaadin.ui.utileria.PostConstruccion;

import com.cdainfo.vaadin.spring.Inject;
import com.vaadin.ui.CustomComponent;

public abstract class BaseUI extends CustomComponent implements PostConstruccion {

	/**
	 * 
	 */
	private static final long serialVersionUID = 7610681199414718597L;
	
	protected final static Logger logger = LogManager.getLogger(BaseUI.class);
	
	private boolean construcido = false;
	
	public BaseUI() {
		super();
		Inject.inject(this);
	}
	
	@Override
	public void attach() {
		super.attach();
		if(!construcido)
		{
			postConstruccion();
			construcido = true;
		}
		
	}

}
